package com.ccc.boot;

import com.ccc.boot.log.DBLog;
import com.ccc.boot.security.config.RsaKeyProperties;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;

/**
 * 后台管理系统启动类
 *
 * @author superC
 * @version 0.1.0
 * @date 2022/3/22
 */

@SpringBootApplication(scanBasePackages = {
        "com.ccc.boot.redis",
        "com.ccc.boot"
})
@MapperScan(basePackages = {
        "com.ccc.boot.monitor.mapper",
        "com.ccc.boot.system.mapper"
})
@EnableConfigurationProperties(RsaKeyProperties.class)
public class AdminApplication {
    protected static final Logger logger = LoggerFactory.getLogger(AdminApplication.class);

    public static void main(String[] args) {
        /**
         * 启动数据库日志执行类
         */
        DBLog.getInstance().start();

        SpringApplication.run(AdminApplication.class, args);
        logger.info("\r\n" +
                "*********************************************************************\r\n" +
                "\r\n" +
                "**********************启动admin服务已完成*************************\r\n" +
                "\r\n" +
                "*********************************************************************");
    }
}